n = int(input())
sum = 0
a = b = 1
for i in range(1,n+1):
    sum += a / b if i % 2 else -a / b
    a = a+1
    b = b+2
print(f"{sum:.3f}")